package chapter02

import scala.collection.mutable
import scala.util.Random

object Test25_Set3 {
  def main(args: Array[String]): Unit = {
    //前边蓝球5个 1-35 后边红球2个 1-12
    val blue = mutable.Set[Int]()
    val red = mutable.Set[Int]()
    while(blue.size<5){
      val i = Random.nextInt(35) + 1
      blue.add(i)
    }
    while(red.size<2){
      val i = Random.nextInt(12) + 1
      red.add(i)
    }
    //排序
    println(blue.toList.sorted)
    println(red.toList.sorted)
  }
}
